﻿using System;
using System.Collections.Generic;
using System.Text;

namespace YinLongTool.Net.Http
{
    public class HttpHeader
    {
        public string Url
        {
            get;
            set;
        }

        public string Host
        {
            get;
            set;
        }

        public string PostData
        {
            get;
            set;
        }

        public System.Text.Encoding PostDataEncoding
        {
            get;
            set;
        }

        public string ReferUrl
        {
            get;
            set;
        }
        /// <summary>
        /// 单位毫秒默认60000
        /// </summary>
        public int Timeout
        {
            get;
            set;
        }
        /// <summary>
        /// 单位毫秒默认60000
        /// </summary>
        public int ReadWriteTimeout
        {
            get;
            set;
        }

        public bool AllowAutoRedirect
        {
            get;
            set;
        }

        public string UserAgent
        {
            get;
            set;
        }

        public bool KeepAlive
        {
            get;
            set;
        }

        public int KeepAliveValue
        {
            get;
            set;
        }

        public List<KeyValuePair<string, string>> CustomHeader
        {
            get;
            private set;
        }

        public string Accept
        {
            get;
            set;
        }

        public string AcceptLanguage
        {
            get;
            set;
        }

        public string AcceptEncoding
        {
            get;
            set;
        }

        public string AcceptCharset
        {
            get;
            set;
        }

        public int RetryCount
        {
            get;
            set;
        }

        public bool HtmlDecode
        {
            get;
            set;
        }

        public string ContentType
        {
            get;
            set;
        }

        public bool UseSsl3
        {
            get;
            set;
        }

        public string CustomCooikeString
        {
            get;
            set;
        }

        public HttpHeader()
        {
            Timeout = 60000;
            ReadWriteTimeout = 60000;
            PostDataEncoding = System.Text.Encoding.UTF8;
            CustomHeader = new List<KeyValuePair<string, string>>();
        }
    }
}
